-
Notifications
You must be signed in to change notification settings - Fork 209
Rebase release-1.16 for workflow & scheduler commands #1562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+7,244
−83
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Docs: TODO
```bash
$ dapr scheduler
Scheduler management commands. Use -k to target a Kubernetes Dapr cluster.
Usage:
dapr scheduler [command]
Aliases:
scheduler, sched
Available Commands:
delete Delete one of more jobs from scheduler."
Job names are formatted by their type, app ID, then identifier.
Actor reminders require the actor type, actor ID, then reminder name, separated by /.
Workflow reminders require the app ID, instance ID, then reminder name, separated by /.
Accepts multiple names.
delete-all Delete all scheduled jobs in the specified namespace of a particular filter.
Accepts a single key as an argument. Deletes all jobs which match the filter key.
export Export all jobs and actor reminders to a binary file, including the tracked count.
get Get a scheduled app job or actor reminder in Scheduler.
Job names are formatted by their type, app ID, then identifier.
Actor reminders require the actor type, actor ID, then reminder name, separated by /.
Workflow reminders require the app ID, instance ID, then reminder name, separated by /.
Activity reminders require the app ID, activity ID, separated by /.
Accepts multiple names.
import Import all jobs and actor reminders from a binary file generated by 'dapr scheduler export'.
list List scheduled jobs in Scheduler.
Flags:
-h, --help help for scheduler
-k, --kubernetes Perform scheduler command on a Kubernetes Dapr cluster
-n, --namespace string Namespace of the Dapr application (default "default")
--scheduler-namespace string Kubernetes namespace where the scheduler is deployed, only relevant if --kubernetes is set (default "dapr-system")
Global Flags:
--log-as-json Log output in JSON format
--runtime-path string The path to the dapr runtime installation directory
Use "dapr scheduler [command] --help" for more information about a command.
```
```
$ dapr scheduler delete --help
Delete one of more jobs from scheduler."
Job names are formatted by their type, app ID, then identifier.
Actor reminders require the actor type, actor ID, then reminder name, separated by /.
Workflow reminders require the app ID, instance ID, then reminder name, separated by /.
Accepts multiple names.
Usage:
dapr scheduler delete [flags]
Aliases:
delete, d, del
Examples:
dapr scheduler delete app/my-app-id/my-job-name
dapr scheduler delete actor/my-actor-type/my-actor-id/my-reminder-name
dapr scheduler delete workflow/my-app-id/my-instance-id/my-workflow-reminder-name
Flags:
-h, --help help for delete
Global Flags:
-k, --kubernetes Perform scheduler command on a Kubernetes Dapr cluster
--log-as-json Log output in JSON format
-n, --namespace string Namespace of the Dapr application (default "default")
--runtime-path string The path to the dapr runtime installation directory
--scheduler-namespace string Kubernetes namespace where the scheduler is deployed, only relevant if --kubernetes is set (default "dapr-system")
```
```
$ dapr scheduler delete-all --help
Delete all scheduled jobs in the specified namespace of a particular filter.
Accepts a single key as an argument. Deletes all jobs which match the filter key.
Usage:
dapr scheduler delete-all [flags]
Aliases:
delete-all, da, delall
Examples:
dapr scheduler delete-all all
dapr scheduler delete-all app
dapr scheduler delete-all app/my-app-id
dapr scheduler delete-all actor/my-actor-type
dapr scheduler delete-all actor/my-actor-type/my-actor-id
dapr scheduler delete-all workflow
dapr scheduler delete-all workflow/my-app-id
dapr scheduler delete-all workflow/my-app-id/my-workflow-id
Flags:
-h, --help help for delete-all
Global Flags:
-k, --kubernetes Perform scheduler command on a Kubernetes Dapr cluster
--log-as-json Log output in JSON format
-n, --namespace string Namespace of the Dapr application (default "default")
--runtime-path string The path to the dapr runtime installation directory
--scheduler-namespace string Kubernetes namespace where the scheduler is deployed, only relevant if --kubernetes is set (default "dapr-system")
```
```
$ dapr scheduler export --help
Export jobs and actor reminders which are scheduled in Scheduler.
Can later be imported using 'dapr scheduler import'.
dapr scheduler export -o output.bin
Usage:
dapr scheduler export [flags]
Flags:
-h, --help help for export
-o, --output-file string Output binary file to export jobs and actor reminders to.
Global Flags:
-k, --kubernetes Perform scheduler command on a Kubernetes Dapr cluster
--log-as-json Log output in JSON format
-n, --namespace string Namespace of the Dapr application (default "default")
--runtime-path string The path to the dapr runtime installation directory
--scheduler-namespace string Kubernetes namespace where the scheduler is deployed, only relevant if --kubernetes is set (default "dapr-system")
```
```
$ dapr scheduler get --help
Get a scheduled app job or actor reminder in Scheduler.
Job names are formatted by their type, app ID, then identifier.
Actor reminders require the actor type, actor ID, then reminder name, separated by /.
Workflow reminders require the app ID, instance ID, then reminder name, separated by /.
Activity reminders require the app ID, activity ID, separated by /.
Accepts multiple names.
Usage:
dapr scheduler get [flags]
Aliases:
get, g, ge
Examples:
dapr scheduler get app/my-app-id/my-job-name
dapr scheduler get actor/my-actor-type/my-actor-id/my-reminder-name
dapr scheduler get workflow/my-app-id/my-instance-id/my-workflow-reminder-name
dapr scheduler get activity/my-app-id/xyz::0::1
Flags:
-h, --help help for get
-o, --output string Output format. One of short, wide, yaml, json (default "short")
Global Flags:
-k, --kubernetes Perform scheduler command on a Kubernetes Dapr cluster
--log-as-json Log output in JSON format
-n, --namespace string Namespace of the Dapr application (default "default")
--runtime-path string The path to the dapr runtime installation directory
--scheduler-namespace string Kubernetes namespace where the scheduler is deployed, only relevant if --kubernetes is set (default "dapr-system")
```
```
$ dapr scheduler import --help
Import jobs and actor reminders to Scheduler from a binary file generated by 'dapr scheduler export'.
dapr scheduler import -f export.bin
Usage:
dapr scheduler import [flags]
Flags:
-h, --help help for import
-f, --input-file string Input file to import jobs and actor reminders from.
Global Flags:
-k, --kubernetes Perform scheduler command on a Kubernetes Dapr cluster
--log-as-json Log output in JSON format
-n, --namespace string Namespace of the Dapr application (default "default")
--runtime-path string The path to the dapr runtime installation directory
--scheduler-namespace string Kubernetes namespace where the scheduler is deployed, only relevant if --kubernetes is set (default "dapr-system")
```
```
$ dapr scheduler list --help
List scheduled jobs in Scheduler.
Usage:
dapr scheduler list [flags]
Flags:
--filter string Filter jobs by type. Supported values are all, app, actor, workflow, activity
(default "all")
-h, --help help for list
-o, --output string Output format. One of short, wide, yaml, json (default "short")
Global Flags:
-k, --kubernetes Perform scheduler command on a Kubernetes Dapr cluster
--log-as-json Log output in JSON format
-n, --namespace string Namespace of the Dapr application (default "default")
--runtime-path string The path to the dapr runtime installation directory
--scheduler-namespace string Kubernetes namespace where the scheduler is deployed, only relevant if --kubernetes is set (default "dapr-system")
```
Signed-off-by: joshvanl <[email protected]>
Fix unit tests
Adds uninstall as start test funcs
Increase e2e test timeout to 30m
Prints output of scheduler run log
Increases timeout for waiting for list output
Set scheduler & placement host address to 127.0.0.1 in tests
Adds error log output to scheduler cmd run tests
Hard code gRPC port
Skip scheduler tests in slim mode
Adds registration log lines
Change app port
Signed-off-by: joshvanl <[email protected]>
Use correct latest version number for dapr e2e
Signed-off-by: joshvanl <[email protected]>
Apply suggestion from @acroca
Co-authored-by: Albert Callarisa <[email protected]>
Signed-off-by: Josh van Leeuwen <[email protected]>
Apply suggestion from @acroca
Co-authored-by: Albert Callarisa <[email protected]>
Signed-off-by: Josh van Leeuwen <[email protected]>
Change name is reflect filter
Signed-off-by: joshvanl <[email protected]>
Humanize last trigger time
Signed-off-by: joshvanl <[email protected]>
Review comments
Signed-off-by: joshvanl <[email protected]>
```
Workflow management commands. Use -k to target a Kubernetes Dapr cluster.
Usage:
dapr workflow [command]
Aliases:
workflow, work
Available Commands:
history Get the history of a workflow instance.
list List workflows for the given app ID.
purge Purge one or more workflow instances with a terminal state. Accepts a workflow instance ID argument or flags to purge multiple/all terminal instances.
raise-event Raise an event for a workflow waiting for an external event. Expects a single argument '<instance-id>/<event-name>'.
rerun ReRun a workflow instance from the beginning or a specific event. Optionally, a new instance ID and input to the starting event can be provided.
resume Resume a workflow that is suspended.
run Run a workflow instance based on a given workflow name. Accepts a single argument, the workflow name.
suspend Suspend a workflow in progress.
terminate Terminate a workflow in progress.
Flags:
-a, --app-id string The app ID owner of the workflow instance
-h, --help help for workflow
-k, --kubernetes Target a Kubernetes dapr installation
-n, --namespace string Namespace to perform workflow operation on (default "default")
Global Flags:
--log-as-json Log output in JSON format
--runtime-path string The path to the dapr runtime installation directory
Get the history of a workflow instance.
Usage:
dapr workflow history [flags]
Flags:
-h, --help help for history
-o, --output string Output format. One of short, wide, yaml, json (default "short")
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
List workflows for the given app ID.
Usage:
dapr workflow list [flags]
Aliases:
list, ls
Flags:
-c, --connection-string string The connection string used to connect and authenticate to the actor state store
-m, --filter-max-age string Filter only the workflows started within the given duration or timestamp. Examples: 300ms, 1.5h or 2h45m, 2023-01-02T15:04:05 or 2023-01-02
-w, --filter-name string Filter only the workflows with the given name
-s, --filter-status string Filter only the workflows with the given runtime status. One of RUNNING, COMPLETED, CONTINUED_AS_NEW, FAILED, CANCELED, TERMINATED, PENDING, SUSPENDED
-h, --help help for list
-o, --output string Output format. One of short, wide, yaml, json (default "short")
-t, --table-name string The name of the table or collection which is used as the actor state store
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Purge one or more workflow instances with a terminal state. Accepts a workflow instance ID argument or flags to purge multiple/all terminal instances.
Usage:
dapr workflow purge [flags]
Flags:
--all Purge all workflow instances in a terminal state. Use with caution.
--all-older-than string Purge workflow instances older than the specified Go duration or timestamp, e.g., '24h' or '2023-01-02T15:04:05Z'.
-c, --connection-string string The connection string used to connect and authenticate to the actor state store
-h, --help help for purge
-t, --table-name string The name of the table or collection which is used as the actor state store
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Raise an event for a workflow waiting for an external event. Expects a single argument '<instance-id>/<event-name>'.
Usage:
dapr workflow raise-event [flags]
Flags:
-h, --help help for raise-event
-x, --input string Optional input data for the new workflow instance. Accepts a JSON string.
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
ReRun a workflow instance from the beginning or a specific event. Optionally, a new instance ID and input to the starting event can be provided.
Usage:
dapr workflow rerun [instance ID] [flags]
Flags:
-e, --event-id uint32 The event ID from which to re-run the workflow. If not provided, the workflow will re-run from the beginning.
-h, --help help for rerun
-x, --input string Optional input data for the new workflow instance. Accepts a JSON string.
--new-instance-id string Optional new ID for the re-run workflow instance. If not provided, a new ID will be generated.
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Resume a workflow that is suspended.
Usage:
dapr workflow resume [flags]
Flags:
-h, --help help for resume
-r, --reason string Reason for resuming the workflow
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Run a workflow instance based on a given workflow name. Accepts a single argument, the workflow name.
Usage:
dapr workflow run [flags]
Flags:
-h, --help help for run
-x, --input string Optional input data for the new workflow instance. Accepts a JSON string.
-i, --instance-id string The target workflow instance ID.
-s, --start-time string Optional start time for the workflow in RFC3339 or Go duration string format. If not provided, the workflow starts immediately. A duration of '0s', or any start time, will cause the command to not wait for the command to start
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Suspend a workflow in progress.
Usage:
dapr workflow suspend [flags]
Flags:
-h, --help help for suspend
-r, --reason string Reason for resuming the workflow
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
Terminate a workflow in progress.
Usage:
dapr workflow terminate [flags]
Flags:
-h, --help help for terminate
-o, --output string Optional output data for the workflow in JSON string format.
Global Flags:
-a, --app-id string The app ID owner of the workflow instance
-k, --kubernetes Target a Kubernetes dapr installation
--log-as-json Log output in JSON format
-n, --namespace string Namespace to perform workflow operation on (default "default")
--runtime-path string The path to the dapr runtime installation directory
```
Signed-off-by: joshvanl <[email protected]>
Fix scheduler & placement host routing in CI
Signed-off-by: joshvanl <[email protected]>
Fix unit tests
Signed-off-by: joshvanl <[email protected]>
Skip workflow tests in slim mode
Signed-off-by: joshvanl <[email protected]>
fix error string
Signed-off-by: joshvanl <[email protected]>
lint
Signed-off-by: joshvanl <[email protected]>
Also delete scheduler jobs during workflow purge
Signed-off-by: joshvanl <[email protected]>
Fix query string
Signed-off-by: joshvanl <[email protected]>
lint
Signed-off-by: joshvanl <[email protected]>
Fix tests
Signed-off-by: joshvanl <[email protected]>
Increase timeout for CI run
Signed-off-by: joshvanl <[email protected]>
Increase workflow timelimit
Signed-off-by: joshvanl <[email protected]>
not empty
Signed-off-by: joshvanl <[email protected]>
Adds sleep
Signed-off-by: joshvanl <[email protected]>
Expand list test to include not included
Signed-off-by: joshvanl <[email protected]>
Remove unrelated test
Signed-off-by: joshvanl <[email protected]>
Review comments
Signed-off-by: joshvanl <[email protected]>
3610998 to
389e76e
Compare
Signed-off-by: joshvanl <[email protected]>
cicoyle
approved these changes
Oct 31, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.